package com.jams.goodox.constant;

import android.os.Environment;

import java.io.File;

/**
 * ClassName:Constants
 * Function:  app的一些常量 Date:
 *
 */
public class Constants {
    // 缓存一级目录
    public final static String CACHE_FILE_FIRST = "uama";
    // 缓存头像
    // 头像缓存目录
    public static final String IMAGE_FILE_HEAD = "vhead.png";
    // 缓存二级目录
    public final static String CACHE_FILE_SECOND = CACHE_FILE_FIRST + File.separator + "cache";
    // 头像缓存目录
    public static final String IMAGE_FILE_LOCATION = CACHE_FILE_SECOND + File.separator + IMAGE_FILE_HEAD;
    //保存图片地址
    public final static String ALBUM_PATH = Environment.getExternalStorageDirectory() + File.separator
            + Constants.CACHE_FILE_FIRST + File.separator + "lcapp" + File.separator;
    public static String caPath = null;


    // 返回的数据结构,分别为data-response_content，status-response_code和msg-response_msg
    public static final String RESPONSE_DATA = "data";

    public static final int pageSize = 20;

    // 支付相关
    // 支付宝异步通知url
    // 支付相关
    // 支付宝异步通知url
    public static String NOTIFY_URL = "";
    // 开发环境
    // 商户id
    public static String PARTNER = "";
    // 商户支付宝
    public static String SELLER = "";
    // 商户私钥
    public static String RSA_PRIVATE = "";
    // 支付宝公钥
    public static String RSA_PUBLIC = "";

    // subCode的标识 Y:需要权限判断  N:无需权限
    public static final int POUR_CODE = 100; // 投诉表扬(Y)
    public static final int REPAIR_CODE = 101; // 维修(Y)
    public static final int RESPONSE_CODE = 102;//报事(Y)
    public static final int EMS_CODE = 103;//快递待寄
    public static final int VISITOR_CODE = 104;//访客通行(Y)
    public static final int TENEMENT_PAY_CODE = 105;//物业缴费(Y)
    public static final int AUTONOMY_RULE_CODE = 106; // 自治规约
    public static final int AUTHORITY_CODE = 107; // 业委会
    public static final int AUTONOMY_VOTE_CODE = 108; // 自治表决
    public static final int VOLUNTEER_CODE = 109; // 志愿者
    public static final int PROCEDURE_VOTE_CODE = 110; // 议事投票
    public static final int EAGLE_EYE_CODE = 111;//鹰眼
    public static final int SMART_DOOR_CODE = 112;//智能开门
    public static final int FLOW_CODE = 114;//流量充值
    public static final int PARKING_CODE = 115;//停车申请(N)
    public static final int MEET_CODE = 116;//场地预约(Y)
    public static final int HeadHunter_Code = 117;//人人都是猎头(N)
    public static final int Breakfast_Code = 118;//营养早餐(N)
    public static final int Afternoon_Tea_Code = 119;//下午茶(N)
    public static final int Snacks_Code = 120;//休闲零食(N)
    public static final int Official_Renting_Code = 121;//官方租房(N)
    public static final int Renting_Code = 122;//转租合租(N)
    public static final int Surrounding_Build_Code = 123;//周边楼盘(N)
    public static final int Party_Member_Code = 124;//党员服务(N)
    public static final int Fast_Car_code = 125;//好司机带带我
    public static final int Scan_Pay_code = 126;//扫码付款

    /*****************************************************************
     * mMode参数解释： "00" - 启动银联正式环境 "01" - 连接银联测试环境
     *****************************************************************/
    public static String mMode = "00";

    // 大图手势相关
    // 我的订单状态 1-未接收 2-处理中 3-已处理 4-已完成 5-已关闭 0-待付款 6 待处理
    public static final int ORDER_UNRECIEVE = 1;
    public static final int ORDER_RECIEVE = 2;
    public static final int ORDER_DEAL = 3;
    public static final int ORDER_COMPLETE = 4;
    public static final int ORDER_CLOSE = 5;
    public static final int ORDER_PAY = 0;
    public static final int ORDER_WAIT_DEAL = 6;

    // 支付 0 是线下 9是线上  1是阿里支付  2 是银联支付 3 是微信支付 4 一网通支付
    public static final String ON_LINE = "9";
    public static final String OFF_LINE = "0";

    //支付方式：1线下 2：线上 3：线上线下
    public static final String PayType_OutLine="1"; // 线下
    public static final String PayType_OnLine="2"; // 线上
    public static final String PayType_All="3"; // 线上线下


    /***********服务汇下服务类型**************/
    public static final int ONSITESERVICE = 1;      // 上门服务
    public static final int ONLINEBOOKING = 2;      // 在线预订
    public static final int ONLINESHOPPING = 3;     // 在线购物
    public static final int WISDOMBUTLER = 4;       // 好氧管家
    public static final int PROPRIETORAUTONOMY = 5; // 业主自治

    //售后状态
    public static final int Customer_Not_Apply = 0;//未申请售后
    public static final int Customer_Waiting = 1;//等待受理
    public static final int Customer_Return_Good = 2;//寄回商品
    public static final int Customer_Waiting_Receive = 3;//客服收货
    public static final int Customer_Waiting_Refund = 4;//等待退款
    public static final int Customer_Refund_Complete = 5;//完成退款
    public static final int Customer_Cancel_By_user = 6;//已经取消(业主取消)
    public static final int Customer_Closed = 7;//关闭

    public static final String returnGoods = "2";//申请退货
    public static final String cancelApplyForm = "1";//取消订单

    public static final int cancelApplyFormType = 1;//取消订单
    public static final int returnGoodsType = 2;//申请退货
    public static final int Shopper_Cancel = 3;//商家申请售后

    public static final String X_Z_F_W = "xzfw";//***服务
    public static final String X_Z_H_Q = "xzhq";//行政后勤
    public static final String D_B_F_W = "dbfw";//代办服务
    public static final String Z_W_F_W = "zwfw";//政务服务

    public static final int RESULT_OK_DETAIL = 105;//从详情页返回
    public static final int RESULT_OK_LIST = 106;//从列表返回
    public static final int RESULT_OK_SIMPLE = 107;//普通的返回
    public static final int REQUEST_SIMPLE = 191;//普通的请求

    public static String getMoneyPayTypeBySubPayType(String subPayType){
        if(PayType_OnLine.equalsIgnoreCase(subPayType))return ON_LINE;
        if(PayType_OutLine.equalsIgnoreCase(subPayType))return OFF_LINE;
        return ON_LINE;
    }

    //获取第三方支付配置的type
    public class PayType{
        public static final String Type_Order= "1";//商品下单接口
        public static final String Type_Recharge= "2";//余额充值接口
        public static final String Type_Flow_Recharge= "3";//流量充值接口
        public static final String Type_Meet= "4";//场地预定
        public static final String Type_Parking= "5";//停车缴费
        public static final String Type_Scan_pay= "6";//转账
        public static final String Type_WYJF = "7";//物业缴费
    }
}
